package com.situ.mall.controller;

import com.situ.common.util.Result;
import com.situ.mall.pojo.entity.Carousel;
import com.situ.mall.service.ICarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/carousel")
public class CarouselController {
    @Autowired
    private ICarouselService carouselService;

    @RequestMapping("/listAll")
    public Result listAll() {
        List<Carousel> list = carouselService.listAll();
        return Result.ok(list);
    }
}
